#!/usr/bin/env node

const fs=require('fs'),
      src=process.argv[2],
      dst=process.argv[3];

try{
  let fid=fs.openSync(src,'r');
  
  fs.writeFileSync(dst,fs.readFileSync(fid).toString('utf8'));

  fs.chmodSync(dst,fs.statSync(src).mode);
  
  fs.closeSync(fid);

}catch(e){
  console.error(e.message);
}


